<?php

/*
 * This file is part of the Geek-Zoo Projects.
 *
 * @copyright (c) 2010 Geek-Zoo Projects More info http://www.geek-zoo.com
 * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License
 * @author quqiang <quqiang@geek-zoo.com>
 *
 */

require ROOT_PATH.'/Helper/admin_abstract.php';

class Action extends admin_abstract
{
    function index()
    {

	    $data = _model('agree')->read(array('id'=>'1'));
	    $this->view->assign('info',$data['content']);
	    $this->view->display('admin/agreement_update.html');
	   

    }

    function update(){
    
    
    	
	 $content = _POST('content');  	
	 

	 if(empty($content)){
	 
	 	$this->msg('不能为空!');
	 }


	 $info = _model('agree')->update(array('id'=>'1'), array('content'=>$content));

	  $this->msg('协议修改成功!', 'admin/agreement.html');

    
    }

    


}
